In the field of image and video processing, image matting and image synthesis is an important technical direction. With the development of science, an image matting and image synthesis technology has been increasingly widely applied in artistic poster design, film and television production, and video communication.
Image-based image matting and synthesis refers to extracting a character or another specified foreground object from an image using an image matting technology, and synthesizing the character or the another specified foreground object into another scene image. Likewise, video-based image matting and synthesis refers to extracting a character or another specified foreground object from a video stream frame by frame using an image matting technology, and synthesizing the character or the another specified foreground object into another scene video stream in order to produce an effect of interaction between the character and the scene.
In an existing image matting and image synthesis technology, when precision of image matting and image synthesis is relatively high, generally, real-time image matting and synthesis cannot be implemented because of a relatively complex algorithm. However, when a requirement of real-time image matting and synthesis can be met using a simple estimation method, precision of synthesis is generally relatively low, and therefore, precision of a synthesized image is low.